<template>
  <div>
    <h2>总价格: {{ $store.getters.totalPrice }}</h2>
    <h2>总价格: {{ $store.getters.totalPriceCoutGreaterN(2) }}</h2>
    <hr />
    <h2>{{ nameInfo }}</h2>
    <h2>{{ ageInfo }}</h2>
    <h2>{{ sNameInfo }}</h2>
    <h2>{{ sAgeInfo }}</h2>
    <hr />
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  computed: {
    ...mapGetters(["nameInfo", "ageInfo"]),
    ...mapGetters({
      sNameInfo: "nameInfo",
      sAgeInfo: "ageInfo",
    }),
  },
};
</script>

<style scoped></style>
